Skip to content

Conversation

geekifier
Copy link

@geekifier geekifier commented Mar 27, 2025

Summary of changes

This PR makes the script work on MacOS (and other non-GNU systems) by avoiding the usage of the GNU sed specific -s parameter.

The -s is actually not even necessary in this case.
I also removed the cat command, which was not needed, as sed will read the file itself, and pipe it forward like before.

The other two (optional) commits clean up some trailing whitespace and add the node name to the status message.

before:

$ ./k8s-iperf tinykube01
[Start] iperf server
sed: illegal option -- s

After:

$ ./k8s-iperf tinykube01
[Start] iperf server on tinykube01
deployment.apps/iperf-server-deployment created

Testing

  • Tested by invoking the script on MacOS using the BSD
  • Also ran the script with gsed installed from the Homebrew coreutils package.

@geekifier
Copy link
Author

@kentwelcome @ctiml can this be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant